﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DTO;
using BUS;
namespace FastDeal.DoanhNghiep
{
    public partial class QuanLiKhuyenMai : System.Web.UI.Page
    {
        private KhuyenMai_BUS khuyenMai_BUS = new KhuyenMai_BUS();
        private List<KhuyenMai> dsKhuyenMai = new List<KhuyenMai>();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["DaDangNhap"] == null || (bool)Session["DaDangNhap"] == false)
            {
                Response.Redirect("~/Default.aspx");
            }
            if ((int)Session["LoaiThanhVien"] != 3)
            {
                Response.Redirect("~/Default.aspx");
            } 

            //int maDoanhNghiep = int.Parse((Session["UserID"]).ToString());
            dsKhuyenMai = khuyenMai_BUS.LayDanhSachTheoMaDoanhNghiep_KhuyenMai(5);
            GV_DSKhuyenMai_DoanhNghiep.DataSource = dsKhuyenMai;
            GV_DSKhuyenMai_DoanhNghiep.DataBind();
            if (Panel1.Height.Value < 800)
            {
                Panel1.Height = 1000;
            }
        }
    }
}